home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / svgabg.exe / NOTES32K.SVG < prev    next >
Text File  |  1992-06-25  |  3KB  |  75 lines

  1. SuperVGA 32768 BGI driver 
  2. Version 1.1
  3. June 12, 1992
  4.  
  5. This is the newest version of my SuperVGA 32768 BGI driver.  All functions
  6. have been implemented, but there may still be bugs.
  7.  
  8. Note:  Palette functions, and the mouse cursor will not work with this driver.
  9.  
  10.   Using the HiColor driver:
  11.  
  12.     Implementing the 32768 color driver involved several hacks, as
  13.     the BGI interface only supports 8-bit color values, but the driver
  14.     needed support for 15-bit color values.  The procedures that needed
  15.     to be changed were those that accepted color values, (SetColor,
  16.     SetFillStyle, SetFillPattern, PutPixel and Floodfill)  and those 
  17.     that return color values (GetColor and GetPixel).
  18.     As the HiColor modes do not support palettes, I decided to use
  19.     the SetRgbPalette call to set colors, as it accepts values for the 
  20.     R,G and B components of the color.
  21.  
  22.     The format of a pixel in the HiColor modes is:
  23.         -Byte 1- -Byte 0-
  24.         xRRRRRGG GGGBBBBB
  25.  
  26.     Several new functions are defined to make the color selection easier.
  27.     In addition, the macro RGB(rv,gv,bv) has been defined.  It packs
  28.     the R, G and B values into the format described above and returns the
  29.     combined color.
  30.  
  31.     * RealDrawColor(); - Sets the current drawing color.
  32.       Usage:
  33.         setcolor(RealDrawColor(RGB(rval,gval,bval)); - HiColor modes
  34.         setcolor(RealDrawColor(cval)); - (suggested for any other driver)
  35.  
  36.     * RealFillColor(); - Sets the current fill color.
  37.       Usage:
  38.         setfillstyle(fillstyle,RealFillColor(RGB(rval,gval,bval)));
  39.         setfillstyle(fillstyle,RealFillColor(cval));
  40.         setfillpattern(fillpat,RealFillColor(RGB(rval,gval,bval)));
  41.         setfillpattern(fillpat,RealFillColor(cval));
  42.  
  43.     * RealColor(); - For putpixel, sets the color of the pixel
  44.                - For floodfill, sets the color of the boundary
  45.         putpixel(x,y,RealColor(RGB(rval,gval,bval)));
  46.         putpixel(x,y,RealColor(cval));
  47.         floodfill(x,y,RealColor(RGB(rval,gval,bval)));
  48.         floodfill(x,y,RealColor(cval));
  49.  
  50.     * GetPixel normally only returns an 8-bit value.  However, the
  51.       value returned from the BGI driver is a 16-bit value in DX (the 
  52.       BGI kernel loads the value into AX and clears the upper 8 bits),
  53.       so to read the value of a pixel:
  54.  
  55.       In Pascal:
  56.         Color := getpixel(x,y);
  57.         inline($89/$56/<Color);  (* Loads 15-bit color value *)
  58.  
  59.       In C:
  60.         Color = getpixel(x,y);
  61.         Color = _DX;
  62.       
  63.  
  64.     * Support for the ATI XL card has been added (1.1) 
  65.         ATI only supports 640x480x32k
  66.  
  67.     * Paging has been added (1.1)
  68.  
  69.       Mode        Paging?        # of pages (with 1024k)
  70.       320x200    yes        8
  71.       640x350    yes        2
  72.       640x400    yes        2
  73.       640x480    no        1
  74.       800x600    no        1
  75.